*This do-file produces all the tables and figures in the online appendix of "Precolonial Elites and Colonial Redistribution of Political Power"
*This do-file requires the following datasets: WD1_Egypt_MPs_1824_1923.dta

version 17.0


***CHANGE WORKING DIRECTORY



************************************************************
************************************************************
*Appendix A1: GEOGRAPHIC ASSIGNMENT OF MEMBERS OF PARLIAMENT
************************************************************
************************************************************


*APPENDIX TABLE A1.1. Level of Aggregation of Geographic Units of Members of Parliament May Vary for the Same MP Across Sessions in Subhi (1947)

use "WD1_Egypt_MPs_1824_1923.dta", clear

tab Geography_min Geography_max if MP_first, matcell(a)
mat Geo0 = a
local VV = Geo0[1,1]
local VD = Geo0[1,2]
local VP = Geo0[1,3]
local VM = Geo0[1,4]
local DV = Geo0[2,1]
local DD = Geo0[2,2]
local DP = Geo0[2,3]
local DM = Geo0[2,4]
local PV = Geo0[3,1]
local PD = Geo0[3,2]
local PP = Geo0[3,3]
local PM = Geo0[3,4]
local MV = Geo0[4,1]
local MD = Geo0[4,2]
local MP = Geo0[4,3]
local MM = Geo0[4,4]
local Totalr1 = `VV' + `VD' + `VP' + `VM'
local Totalr2 = `DV' + `DD' + `DP' + `DM'
local Totalr3 = `PV' + `PD' + `PP' + `PM'
local Totalr4 = `MV' + `MD' + `MP' + `MM'
local Totalc1 = `VV' + `DV' + `PV' + `MV'
local Totalc2 = `VD' + `DD' + `PD' + `MD'
local Totalc3 = `VP' + `DP' + `PP' + `MP'
local Totalc4 = `VM' + `DM' + `PM' + `MM'
local Total = `Totalr1' + `Totalr2' + `Totalr3' + `Totalr4'

tab Geography_min Geography_max, matcell(b)
mat Geo01 = b
local VV1 = Geo01[1,1]
local VD1 = Geo01[1,2]
local VP1 = Geo01[1,3]
local VM1 = Geo01[1,4]
local DV1 = Geo01[2,1]
local DD1 = Geo01[2,2]
local DP1 = Geo01[2,3]
local DM1 = Geo01[2,4]
local PV1 = Geo01[3,1]
local PD1 = Geo01[3,2]
local PP1 = Geo01[3,3]
local PM1 = Geo01[3,4]
local MV1 = Geo01[4,1]
local MD1 = Geo01[4,2]
local MP1 = Geo01[4,3]
local MM1 = Geo01[4,4]
local Totalr11 = `VV1' + `VD1' + `VP1' + `VM1'
local Totalr21 = `DV1' + `DD1' + `DP1' + `DM1'
local Totalr31 = `PV1' + `PD1' + `PP1' + `PM1'
local Totalr41 = `MV1' + `MD1' + `MP1' + `MM1'
local Totalc11 = `VV1' + `DV1' + `PV1' + `MV1'
local Totalc21 = `VD1' + `DD1' + `PD1' + `MD1'
local Totalc31 = `VP1' + `DP1' + `PP1' + `MP1'
local Totalc41 = `VM1' + `DM1' + `PM1' + `MM1'
local Total1 = `Totalr11' + `Totalr21' + `Totalr31' + `Totalr41'


capture file close fh
file open fh  using "TableA1-1.tex", write replace
file write fh "\begin{tabular}{ll*{5}{c}}"
file write fh "\toprule" _n
file write fh  "& & \multicolumn{4}{c}{MP's Highest Level of Geographic Assignment} & \\" _n
file write fh  "\cmidrule(lr){3-6} " _n
file write fh  " & & Village & District & Province & Missing & Total   \\" _n
file write fh  "\cmidrule(lr){1-7} " _n
file write fh  "\parbox[t]{2mm}{\multirow{4}{*}{\rotatebox[origin=c]{90}{Lowest Level}}} & Village & `VV' (`VV1') & `VD' (`VD1') & `VP' (`VP1') & `VM' (`VM1') & `Totalr1' (`Totalr11')  \\" _n
file write fh  " & District & `DV' (`DV1') & `DD' (`DD1') & `DP' (`DP1') & `DM' (`DM1') & `Totalr2' (`Totalr21')   \\" _n
file write fh  " & Province & `PV' (`PV1') & `PD' (`PD1') & `PP' (`PP1') & `PM' (`PM1') & `Totalr3' (`Totalr31')  \\" _n
file write fh  " & Missing & `MV' (`MV1') & `MD' (`MD1') & `MP' (`MP1') & `MM' (`MM1') & `Totalr4' (`Totalr41')   \\" _n
file write fh  "\cmidrule(lr){1-7} " _n
file write fh  " & Total & `Totalc1' (`Totalc11') & `Totalc2' (`Totalc21') & `Totalc3' (`Totalc31') & `Totalc4' (`Totalc41') & `Total' (`Total1')  \\" _n
file write fh "\bottomrule" _n
file write fh "\end{tabular}" _n
file close fh


*APPENDIX TABLE A1.2. Level of Geographic Assignment of Members of Parliament Before and After Imputation

use "WD1_Egypt_MPs_1824_1923.dta", clear

tab1 Geography, matcell(b)
mat Geo0= b

local V0 = Geo0[1,1]
local D0 = Geo0[2,1]
local P0 = Geo0[3,1]
local M0 = Geo0[4,1]
local Total0 = `V0' + `D0' + `P0' + `M0'

tab1 Geography1 if MP_first, matcell(c)
mat Geo1 = c

local V1 = Geo1[1,1]
local D1 = Geo1[2,1]
local P1 = Geo1[3,1]
local M1 = Geo1[4,1]
local Total1 = `V1' + `D1' + `P1' + `M1'

tab1 Geography2 if MP_first, matcell(d)
mat Geo2 = d

local V2 = Geo2[1,1]
local D2 = Geo2[2,1]
local P2 = Geo2[3,1]
local M2 = Geo2[4,1]
local Total2 = `V2' + `D2' + `P2' + `M2'

tab1 Geography1, matcell(f)
mat Geo11 = f
local V11 = Geo11[1,1]
local D11 = Geo11[2,1]
local P11 = Geo11[3,1]
local M11 = Geo11[4,1]
local Total11 = `V11' + `D11' + `P11' + `M11'

tab1 Geography2, matcell(g)
mat Geo21 = g
local V21 = Geo21[1,1]
local D21 = Geo21[2,1]
local P21 = Geo21[3,1]
local M21 = Geo21[4,1]
local Total21 = `V21' + `D21' + `P21' + `M21'

capture file close fh
file open fh  using "TableA1-2.tex", write replace
file write fh "\begin{tabular}{l*{3}{c}}"
file write fh "\toprule" _n
file write fh  " Level of Geographic Assignment & Original & STEP A & STEP B   \\" _n
file write fh  "\cmidrule(lr){1-4} " _n
file write fh  " Village & `V0' & `V1' (`V11')  & `V2' (`V21') \\" _n
file write fh  " District & `D0' &  `D1'  (`D11') &  `D2' (`D21')  \\" _n
file write fh  " Province & `P0' &  `P1' (`P11') & `P2' (`P21') \\" _n
file write fh  " Missing & `M0' & `M1' (`M11') &  `M2' (`M21') \\" _n
file write fh  "\cmidrule(lr){1-4} " _n
file write fh  " Total & `Total0' & `Total1' (`Total11') & `Total2' (`Total21') \\" _n
file write fh "\bottomrule" _n
file write fh "\end{tabular}" _n
file close fh


**********************************************************
**********************************************************
*APPENDIX A2: SOCIAL CLASS CODING OF MEMBERS OF PARLIAMENT
**********************************************************
**********************************************************


*APPENDIX TABLE A2.3. Distribution of Occupation, Honorific Title, and Urban/Rural Status of Constituency by Social Class of Members of Parliament

use "WD1_Egypt_MPs_1824_1923.dta", clear

gen occupation_group_mod = 1 if professional_mod
replace occupation_group_mod = 2 if businessman_mod
replace occupation_group_mod = 3 if religious_elite_mod
replace occupation_group_mod = 4 if top_bureaucrat_mod
replace occupation_group_mod = 5 if bureaucrat_mod
replace occupation_group_mod = 6 if village_headman_mod
replace occupation_group_mod = 7 if ayan_mod
replace occupation_group_mod = 8 if missing_mod

gen title_group_mod = 1 if mp_sheikh_mod
replace title_group_mod = 2 if mp_effendi_mod
replace title_group_mod = 3 if mp_bek_mod
replace title_group_mod = 4 if mp_pasha_mod
replace title_group_mod = 5 if mp_othertitle_mod
replace title_group_mod = 6 if mp_missingtitle_mod

gen constituency = 1 if urban
replace constituency = 2 if !urban & !Missing
replace constituency = 3 if Missing

tab1 occupation_group_mod if aristocracy, matcell(a)
mat Occ1 = a
local Occ12 = Occ1[1,1]
local Occ14 = Occ1[2,1]
local Occ15 = Occ1[3,1]
local Occ17 = Occ1[4,1]
local Occ18 = Occ1[5,1]

local Total1 = `Occ12' + `Occ14' + `Occ15' + `Occ17' + `Occ18'

tab1 occupation_group_mod if ruralbourgeoisie, matcell(b)
mat Occ2 = b
local Occ21 = Occ2[1,1]
local Occ22 = Occ2[2,1]
local Occ25 = Occ2[3,1]
local Occ26 = Occ2[4,1]
local Occ27 = Occ2[5,1]
local Occ28 = Occ2[6,1]
local Total2 = `Occ21' + `Occ22' + `Occ25' + `Occ26' + `Occ27' + `Occ28'

tab1 occupation_group_mod if urbanbourgeoisie, matcell(c)
mat Occ3 = c
local Occ32 = Occ3[1,1]
local Occ35 = Occ3[2,1]
local Occ37 = Occ3[3,1]
local Occ38 = Occ3[4,1]
local Total3 = `Occ32' + `Occ35' + `Occ37' + `Occ38'

tab1 occupation_group_mod if classmissing, matcell(x)
mat Occ4 = x
local Occ41 = Occ4[1,1]
local Occ43 = Occ4[2,1]
local Occ45 = Occ4[3,1]
local Occ47 = Occ4[4,1]
local Occ48 = Occ4[5,1]
local Total4 = `Occ41' + `Occ43' + `Occ45' + `Occ47' + `Occ48'

tab1 title_group_mod if aristocracy, matcell(d)
mat Tit1 = d
local Tit13 = Tit1[1,1]
local Tit14 = Tit1[2,1]
local Tit15 = Tit1[3,1]

tab1 title_group_mod if ruralbourgeoisie, matcell(e)
mat Tit2 = e
local Tit21 = Tit2[1,1]
local Tit22 = Tit2[2,1]
local Tit23 = Tit2[3,1]
local Tit25 = Tit2[4,1]
local Tit26 = Tit2[5,1]

tab1 title_group_mod if urbanbourgeoisie, matcell(f)
mat Tit3 = f
local Tit31 = Tit3[1,1]
local Tit32 = Tit3[2,1]
local Tit35 = Tit3[3,1]
local Tit36 = Tit3[4,1]

tab1 title_group_mod if classmissing, matcell(y)
mat Tit4 = y
local Tit41 = Tit4[1,1]
local Tit42 = Tit4[2,1]
local Tit45 = Tit4[3,1]
local Tit46 = Tit4[4,1]

tab1 constituency if aristocracy, matcell(g)
mat Con1 = g
local Con11 = Con1[1,1]
local Con12 = Con1[2,1]
local Con13 = Con1[3,1]

tab1 constituency if ruralbourgeoisie, matcell(h)
mat Con2 = h
local Con22 = Con2[1,1]

tab1 constituency if urbanbourgeoisie, matcell(i)
mat Con3 = i
local Con31 = Con3[1,1]

tab1 constituency if classmissing, matcell(z)
mat Con4 = z
local Con41 = Con4[1,1]
local Con42 = Con4[2,1]
local Con43 = Con4[3,1]

capture file close fh
file open fh  using "TableA2-3.tex", write replace
file write fh "\begin{tabular}{l|l|l|l}"
file write fh "\toprule" _n
file write fh  "\multicolumn{1}{c|}{\textbf{Class}} & \multicolumn{1}{c|}{\textbf{Honorific Title}} & \multicolumn{1}{c|}{\textbf{Occupation}} & \multicolumn{1}{c}{\textbf{Constituency}}   \\  \hline" _n
file write fh  " Landed Elite (`Total1') & \begin{tabular}[c]{@{}l@{}}Pasha (`Tit14'), Bey (`Tit13'), \\ Other (`Tit15')\end{tabular} & \begin{tabular}[c]{@{}l@{}}Missing (`Occ18'), Notable (`Occ17'), \\ Bureaucrat (`Occ15'), Business (`Occ12'), \\ Top bureaucrat (`Occ14')\end{tabular} &  \begin{tabular}[c]{@{}l@{}}Missing (`Con13'), \\ Urban (`Con11'), \\ Rural (`Con12')\end{tabular} \\ \hline" _n
file write fh  " Rural Middle Class (`Total2') & \begin{tabular}[c]{@{}l@{}}Sheikh (`Tit21'), Effendi (`Tit22'), \\ Bey (`Tit23'), Other (`Tit25'), \\ Missing (`Tit26')\end{tabular} & \begin{tabular}[c]{@{}l@{}}Village headman (`Occ26'), Notable (`Occ27'), \\ Missing (`Occ28'), Bureaucrat (`Occ25'), \\ Professional (`Occ21'), Business (`Occ22')\end{tabular} & Rural (`Con22') \\ \hline" _n
file write fh  "Urban Middle Class (`Total3') & \begin{tabular}[c]{@{}l@{}}Effendi (`Tit32'), Sheikh (`Tit31'), \\ Other (`Tit35'), Missing (`Tit36')\end{tabular} & \begin{tabular}[c]{@{}l@{}}Missing (`Occ38'), Notable (`Occ37'),\\ Bureaucrat (`Occ35'), Business (`Occ32') \end{tabular} & Urban (`Con31') \\ \hline" _n
file write fh  "Missing (`Total4') & \begin{tabular}[c]{@{}l@{}}Effendi (`Tit42'), Sheikh (`Tit41'), \\ Other (`Tit45'), Missing (`Tit46')\end{tabular} & \begin{tabular}[c]{@{}l@{}}Missing (`Occ48'), Notable (`Occ47'),\\ Bureaucrat (`Occ45'), \\ Professional (`Occ41'), Religious Elite (`Occ43')\end{tabular} & \begin{tabular}[c]{@{}l@{}}Urban (`Con41'), \\ Rural (`Con42'), \\ Missing (`Con43')\end{tabular} \\" _n
file write fh "\bottomrule" _n
file write fh "\end{tabular}" _n
file close fh


*APPENDIX FIGURE A2.2. The Occupational Composition of Members of Parliament, 1824–1923

use "WD1_Egypt_MPs_1824_1923.dta", clear

graph bar (sum) top_bureaucrat_mod professional_mod businessman_mod religious_elite_mod bureaucrat_mod village_headman_mod ayan_mod missing_mod, over(cycle, label (angle(45))) stack legend(order(1 "Top Bureaucrat" 2 "Professional" 3 "Business" 4 "Religious Elite" 5 "Bureaucrat" 6 "Village Headman" 7 "Notable" 8 "Missing")) title("") graphregion(color(white))

graph export FigureA2-2.eps, replace  
 
 
*APPENDIX FIGURE A2.3. The Honorific Title Composition of Members of Parliament, 1824–1923

use "WD1_Egypt_MPs_1824_1923.dta", clear
graph bar (sum) mp_sheikh_mod mp_effendi_mod mp_bek_mod mp_pasha_mod mp_othertitle_mod mp_missingtitle_mod, over(cycle, label (angle(45))) stack legend(order(1 "Sheikh" 2 "Effendi" 3 "Bey" 4 "Pasha" 5 "Other" 6 "Missing")) title("") graphregion(color(white))

graph export FigureA2-3.eps, replace


*APPENDIX FIGURE A2.4. The Urban-Rural Status of the Parliamentary Constituency of Members of Parliament, 1824–1923

use "WD1_Egypt_MPs_1824_1923.dta", clear
gen rural = (1 - urban) & Missing!=1
graph bar (sum) rural urban Missing, over(cycle, label (angle(45))) stack legend(order(1 "Rural Province" 2 "Urban Province" 3 "Missing")) title("") graphregion(color(white))
graph export FigureA2-4.eps, replace



****************************************************
****************************************************
*********APPENDIX A3: PRECOLONIAL TRENDS************
****************************************************
****************************************************

*APPENDIX FIGURE A3.5. The British Occupation and Social Class Composition of Parliament: Precolonial Trends (No Controls)

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if Missing == 1 //136
drop if classmissing == 1 //16

	quietly reghdfe ruralbourgeoisie c.cottonyieldperfed1877P##ib5.cycle, absorb(cycle provincecode_1882) cluster(provincecode_1882)
	estimates store ruralbourgeoisie1
	
	coefplot (ruralbourgeoisie1, keep(1.cycle#c.cottonyieldperfed1877P ///
	2.cycle#c.cottonyieldperfed1877P ///
	3.cycle#c.cottonyieldperfed1877P ///
	4.cycle#c.cottonyieldperfed1877P ///
	5.cycle#c.cottonyieldperfed1877P ///
	6.cycle#c.cottonyieldperfed1877P ///
	7.cycle#c.cottonyieldperfed1877P ///
	8.cycle#c.cottonyieldperfed1877P ///
	9.cycle#c.cottonyieldperfed1877P ///
	10.cycle#c.cottonyieldperfed1877P ///
	11.cycle#c.cottonyieldperfed1877P)), ///
	coeflabel(1.cycle#c.cottonyieldperfed1877P = "1824-1837" ///
	2.cycle#c.cottonyieldperfed1877P = "1866-1869" ///
	3.cycle#c.cottonyieldperfed1877P = "1870-1873" ///
	4.cycle#c.cottonyieldperfed1877P = "1876-1879" ///
	5.cycle#c.cottonyieldperfed1877P = "1881-1882" ///
	6.cycle#c.cottonyieldperfed1877P = "1883-1890" ///
	7.cycle#c.cottonyieldperfed1877P = "1890-1895" ///
	8.cycle#c.cottonyieldperfed1877P = "1895-1901" ///
	9.cycle#c.cottonyieldperfed1877P = "1901-1907" ///
	10.cycle#c.cottonyieldperfed1877P = "1907-1913" ///
	11.cycle#c.cottonyieldperfed1877P = "1913-1923", angle(45)) ///
	recast(connected) vertical ci(90) xline(5.5) graphregion(color(white)) scheme(s2mono) omitted baselevels ylabel(-0.3(0.1)0.3)

	graph export FigureA3-5a.eps, replace

	
	quietly reghdfe aristocracy c.cottonyieldperfed1877P##ib5.cycle, absorb(cycle provincecode_1882) cluster(provincecode_1882)
	estimates store aristocracy1
	
	coefplot (aristocracy1, keep(1.cycle#c.cottonyieldperfed1877P ///
	2.cycle#c.cottonyieldperfed1877P ///
	3.cycle#c.cottonyieldperfed1877P ///
	4.cycle#c.cottonyieldperfed1877P ///
	5.cycle#c.cottonyieldperfed1877P ///
	6.cycle#c.cottonyieldperfed1877P ///
	7.cycle#c.cottonyieldperfed1877P ///
	8.cycle#c.cottonyieldperfed1877P ///
	9.cycle#c.cottonyieldperfed1877P ///
	10.cycle#c.cottonyieldperfed1877P ///
	11.cycle#c.cottonyieldperfed1877P)), ///
	coeflabel(1.cycle#c.cottonyieldperfed1877P = "1824-1837" ///
	2.cycle#c.cottonyieldperfed1877P = "1866-1869" ///
	3.cycle#c.cottonyieldperfed1877P = "1870-1873" ///
	4.cycle#c.cottonyieldperfed1877P = "1876-1879" ///
	5.cycle#c.cottonyieldperfed1877P = "1881-1882" ///
	6.cycle#c.cottonyieldperfed1877P = "1883-1890" ///
	7.cycle#c.cottonyieldperfed1877P = "1890-1895" ///
	8.cycle#c.cottonyieldperfed1877P = "1895-1901" ///
	9.cycle#c.cottonyieldperfed1877P = "1901-1907" ///
	10.cycle#c.cottonyieldperfed1877P = "1907-1913" ///
	11.cycle#c.cottonyieldperfed1877P = "1913-1923", angle(45)) ///
	recast(connected) vertical ci(90) xline(5.5) graphregion(color(white)) scheme(s2mono) omitted baselevels ylabel(-0.3(0.1)0.3)

	graph export FigureA3-5b.eps, replace




*APPENDIX FIGURE A3.6. The British Occupation and Social Class Composition of Parliament: Precolonial Trends (With Controls)

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if Missing == 1 //136
drop if classmissing == 1 //16

		
	quietly reghdfe ruralbourgeoisie c.cottonyieldperfed1877P##ib5.cycle c.cerealyieldperfed1877P##ib5.cycle, absorb(cycle provincecode_1882) cluster(provincecode_1882)
	estimates store ruralbourgeoisie2
	
	coefplot (ruralbourgeoisie2, keep(1.cycle#c.cottonyieldperfed1877P ///
	2.cycle#c.cottonyieldperfed1877P ///
	3.cycle#c.cottonyieldperfed1877P ///
	4.cycle#c.cottonyieldperfed1877P ///
	5.cycle#c.cottonyieldperfed1877P ///
	6.cycle#c.cottonyieldperfed1877P ///
	7.cycle#c.cottonyieldperfed1877P ///
	8.cycle#c.cottonyieldperfed1877P ///
	9.cycle#c.cottonyieldperfed1877P ///
	10.cycle#c.cottonyieldperfed1877P ///
	11.cycle#c.cottonyieldperfed1877P)), ///
	coeflabel(1.cycle#c.cottonyieldperfed1877P = "1824-1837" ///
	2.cycle#c.cottonyieldperfed1877P = "1866-1869" ///
	3.cycle#c.cottonyieldperfed1877P = "1870-1873" ///
	4.cycle#c.cottonyieldperfed1877P = "1876-1879" ///
	5.cycle#c.cottonyieldperfed1877P = "1881-1882" ///
	6.cycle#c.cottonyieldperfed1877P = "1883-1890" ///
	7.cycle#c.cottonyieldperfed1877P = "1890-1895" ///
	8.cycle#c.cottonyieldperfed1877P = "1895-1901" ///
	9.cycle#c.cottonyieldperfed1877P = "1901-1907" ///
	10.cycle#c.cottonyieldperfed1877P = "1907-1913" ///
	11.cycle#c.cottonyieldperfed1877P = "1913-1923", angle(45)) ///
	recast(connected) vertical ci(90) xline(5.5) graphregion(color(white)) scheme(s2mono) omitted baselevels ylabel(-0.3(0.1)0.3)

	graph export FigureA3-6a.eps, replace

	quietly reghdfe aristocracy c.cottonyieldperfed1877P##ib5.cycle c.cerealyieldperfed1877P##ib5.cycle, absorb(cycle provincecode_1882) cluster(provincecode_1882)
	estimates store aristocracy2
	
	coefplot (aristocracy2, keep(1.cycle#c.cottonyieldperfed1877P ///
	2.cycle#c.cottonyieldperfed1877P ///
	3.cycle#c.cottonyieldperfed1877P ///
	4.cycle#c.cottonyieldperfed1877P ///
	5.cycle#c.cottonyieldperfed1877P ///
	6.cycle#c.cottonyieldperfed1877P ///
	7.cycle#c.cottonyieldperfed1877P ///
	8.cycle#c.cottonyieldperfed1877P ///
	9.cycle#c.cottonyieldperfed1877P ///
	10.cycle#c.cottonyieldperfed1877P ///
	11.cycle#c.cottonyieldperfed1877P)), ///
	coeflabel(1.cycle#c.cottonyieldperfed1877P = "1824-1837" ///
	2.cycle#c.cottonyieldperfed1877P = "1866-1869" ///
	3.cycle#c.cottonyieldperfed1877P = "1870-1873" ///
	4.cycle#c.cottonyieldperfed1877P = "1876-1879" ///
	5.cycle#c.cottonyieldperfed1877P = "1881-1882" ///
	6.cycle#c.cottonyieldperfed1877P = "1883-1890" ///
	7.cycle#c.cottonyieldperfed1877P = "1890-1895" ///
	8.cycle#c.cottonyieldperfed1877P = "1895-1901" ///
	9.cycle#c.cottonyieldperfed1877P = "1901-1907" ///
	10.cycle#c.cottonyieldperfed1877P = "1907-1913" ///
	11.cycle#c.cottonyieldperfed1877P = "1913-1923", angle(45)) ///
	recast(connected) vertical ci(90) xline(5.5) graphregion(color(white)) scheme(s2mono) omitted baselevels ylabel(-0.3(0.1)0.3)

	graph export FigureA3-6b.eps, replace





****************************************************
****************************************************
********APPENDIX A4: ROBUSTNESS CHECKS**************
****************************************************
****************************************************


*APPENDIX TABLE A4.4. Alternative Interpretations of Precolonial Cotton Productivity: Precolonial State Capacity and Geography

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if Missing == 1 //136
drop if classmissing == 1 //16

local controls1 1.post1882#(c.latP c.longP c.distancecairo_kmP)
local controls2 1.post1882#(c.milpolP48 c.bureaucracyP48)

foreach y in aristocracy ruralbourgeoisie urbanbourgeoisie{
	
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882 `controls1', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'1
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'1
	
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882 `controls2', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'2
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'2
	
}


esttab aristocracy1 aristocracy2 ruralbourgeoisie1 ruralbourgeoisie2 urbanbourgeoisie1 urbanbourgeoisie2 ///
using TableA4-4.tex, replace booktabs nogaps compress ///
keep(1.post1882#c.cottonyieldperfed1877P 1.post1882#c.latP ///
1.post1882#c.longP 1.post1882#c.distancecairo_kmP ///
1.post1882#c.milpolP48 1.post1882#c.bureaucracyP48) ///
coeflabel(1.post1882#c.cottonyieldperfed1877P "Post-1882 \$\times\$ Cotton" ///
1.post1882#c.latP "Post-1882 \$\times\$ Latitude" ///
1.post1882#c.longP "Post-1882 \$\times\$ Longitude" ///
1.post1882#c.distancecairo_kmP "Post-1882 \$\times\$ Dist. Cairo" ///
1.post1882#c.milpolP48 "Post-1882 \$\times\$ Prop. Military 1848" ///
1.post1882#c.bureaucracyP48 "Post-1882 \$\times\$ Prop. Bureaucracy 1848") nomtitles ///
mgroups("\specialcell{=1 if Landed Elite}" "\specialcell{=1 if Rural\\Middle Class}" "\specialcell{=1 if Urban\\Middle Class}", pattern(1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span) ///
label se b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) nonotes ///
noconstant stats(cyclefe provincefe Clusters Obs R2 meany, fmt(0 0 0 0 2 2) label("Session FEs" "Province FEs" "Clusters (Provinces)" "Obs (MP-Session)" "\$R^2\$" "Av. Dep. Var. 1866-1882")) substitute(\_ _)



*APPENDIX TABLE A4.5. The British Occupation and Social Class Composition of Parliament: Non-Linear Cotton Productivity

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if Missing == 1 //136
drop if classmissing == 1 //16

*Define quartiles of cotton productivity based on the cross-province distribution (unweighted)
gen cottonyieldperfed1877P_Q = 1 if cottonyieldperfed1877P == 0
replace cottonyieldperfed1877P_Q = 2 if cottonyieldperfed1877P > 0 & cottonyieldperfed1877P <= 1.067931
replace cottonyieldperfed1877P_Q = 3 if cottonyieldperfed1877P > 1.067931 & cottonyieldperfed1877P <= 1.756632
replace cottonyieldperfed1877P_Q = 4 if cottonyieldperfed1877P > 1.756632
replace cottonyieldperfed1877P_Q = . if cottonyieldperfed1877P == .

*Define above and below the median of cotton productivity based on the cross-province distribution (unweighted)
gen cottonyieldperfed1877P_HM = cottonyieldperfed1877P > 1.067931
replace cottonyieldperfed1877P_HM = . if cottonyieldperfed1877P == .

*Define above and below zero cotton productivity
gen cottonyieldperfed1877P_POS = cottonyieldperfed1877P > 0
replace cottonyieldperfed1877P_POS = . if cottonyieldperfed1877P == .

local controls 1.post1882#c.cerealyieldperfed1877P

foreach y in aristocracy ruralbourgeoisie urbanbourgeoisie{
	
	quietly reghdfe `y' 1.cottonyieldperfed1877P_POS#1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'0
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'0
	
	quietly reghdfe `y' 1.cottonyieldperfed1877P_HM#1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'1
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'1
	
	quietly reghdfe `y' 1.post1882#(2.cottonyieldperfed1877P_Q 3.cottonyieldperfed1877P_Q 4.cottonyieldperfed1877P_Q) `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'2
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'2
	
}


esttab aristocracy0 aristocracy1 aristocracy2 ruralbourgeoisie0 ruralbourgeoisie1 ruralbourgeoisie2 urbanbourgeoisie0 urbanbourgeoisie1 urbanbourgeoisie2 ///
using TableA4-5.tex, replace booktabs nogaps compress ///
keep(1.cottonyieldperfed1877P_POS#1.post1882 1.cottonyieldperfed1877P_HM#1.post1882 1.post1882#2.cottonyieldperfed1877P_Q ///
1.post1882#3.cottonyieldperfed1877P_Q 1.post1882#4.cottonyieldperfed1877P_Q 1.post1882#c.cerealyieldperfed1877P) ///
order(1.cottonyieldperfed1877P_POS#1.post1882 1.cottonyieldperfed1877P_HM#1.post1882 1.post1882#2.cottonyieldperfed1877P_Q ///
1.post1882#3.cottonyieldperfed1877P_Q 1.post1882#4.cottonyieldperfed1877P_Q 1.post1882#c.cerealyieldperfed1877P) ///
coeflabel(1.cottonyieldperfed1877P_POS#1.post1882 "Post-1882 \$\times\$ Cotton (> 0)" ///
1.cottonyieldperfed1877P_HM#1.post1882 "Post-1882 \$\times\$ Cotton (> Median)" ///
1.post1882#2.cottonyieldperfed1877P_Q "Post-1882 \$\times\$ Cotton (Q2)" ///
1.post1882#3.cottonyieldperfed1877P_Q "Post-1882 \$\times\$ Cotton (Q3)" ///
1.post1882#4.cottonyieldperfed1877P_Q "Post-1882 \$\times\$ Cotton (Q4)" ///
1.post1882#c.cerealyieldperfed1877P "Post-1882 \$\times\$ Cereals") nomtitles ///
mgroups("\specialcell{=1 if Landed Elite}" "\specialcell{=1 if Rural\\Middle Class}" "\specialcell{=1 if Urban\\Middle Class}", pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span) ///
label se b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) nonotes ///
noconstant stats(cyclefe provincefe Clusters Obs R2 meany, fmt(0 0 0 0 2 2) label("Session FEs" "Province FEs" "Clusters (Provinces)" "Obs (MP-Session)" "\$R^2\$" "Av. Dep. Var. 1866-1882")) substitute(\_ _)




*APPENDIX TABLE A4.6. The British Occupation and Social Class Composition of Parliament: FAO-GAEZ Cotton Suitability Index

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if Missing == 1 //136
drop if classmissing == 1 //16

local controls 1.post1882#c.mean_wheat_indexP


foreach y in aristocracy ruralbourgeoisie urbanbourgeoisie{
	
	quietly reghdfe `y' c.mean_cotton_indexP#1.post1882, absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'1
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'1
	
	quietly reghdfe `y' c.mean_cotton_indexP#1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'2
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'2
}


esttab aristocracy1 aristocracy2 ruralbourgeoisie1 ruralbourgeoisie2 urbanbourgeoisie1 urbanbourgeoisie2 ///
using TableA4-6.tex, replace booktabs nogaps compress ///
keep(1.post1882#c.mean_cotton_indexP 1.post1882#c.mean_wheat_indexP) ///
coeflabel(1.post1882#c.mean_cotton_indexP "Post-1882 \$\times\$ Cotton" ///
1.post1882#c.mean_wheat_indexP "Post-1882 \$\times\$ Cereals") nomtitles ///
mgroups("\specialcell{=1 if Landed Elite}" "\specialcell{=1 if Rural\\Middle Class}" "\specialcell{=1 if Urban\\Middle Class}", pattern(1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span) ///
label se b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) nonotes ///
noconstant stats(cyclefe provincefe Clusters Obs R2 meany, fmt(0 0 0 0 2 2) label("Session FEs" "Province FEs" "Clusters (Provinces)" "Obs (MP-Session)" "\$R^2\$" "Av. Dep. Var. 1866-1882")) substitute(\_ _)




*APPENDIX TABLE A4.7. The British Occupation and Social Class Composition of Parliament: Wild Cluster Bootstrap (WCB) Standard Errors

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if Missing == 1 //136
drop if classmissing == 1 //16

*This version of boottest produced an error whenever I tried using the interaction term with the # sign. I manually created the interaction term instead.

gen cottonpost1882 = cottonyieldperfed1877P*post1882

local controls 1.post1882#c.cerealyieldperfed1877P

local aristocracy1 = "aristocracy1"
	
	quietly reghdfe aristocracy cottonpost1882 i.cycle, absorb(provincecode_1882) cluster(provincecode_1882)
	eststo `aristocracy1'
	quietly sum aristocracy if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `aristocracy1'
	
	local indep_vars cottonpost1882
	local indep_hypotheses
	foreach var of local indep_vars{
	local indep_hypotheses = "`indep_hypotheses' {`var'}"
}

	boottest `indep_hypotheses', cluster(provincecode_1882) reps (999999) weight (webb) nograph
	matrix boot_pval  = J(1,1,.)
	matrix boot_pval[1,1] = r(p)


	foreach mat in "boot_pval" {
	matrix colnames `mat' = `indep_vars'
	estadd matrix `mat' = `mat': `aristocracy1'
}

local aristocracy2 = "aristocracy2"

	quietly reghdfe aristocracy cottonpost1882 `controls' i.cycle, absorb(provincecode_1882) cluster(provincecode_1882)
	eststo `aristocracy2'
	quietly sum aristocracy if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `aristocracy2'
	
	local indep_vars cottonpost1882
	local indep_hypotheses
	foreach var of local indep_vars{
	local indep_hypotheses = "`indep_hypotheses' {`var'}"
}

	boottest `indep_hypotheses', cluster(provincecode_1882) reps (999999) weight (webb) nograph
	matrix boot_pval  = J(1,1,.)
	matrix boot_pval[1,1] = r(p)


	foreach mat in "boot_pval" {
	matrix colnames `mat' = `indep_vars'
	estadd matrix `mat' = `mat': `aristocracy2'
}

local ruralbourgeoisie1 = "ruralbourgeoisie1"

	quietly reghdfe ruralbourgeoisie cottonpost1882 i.cycle, absorb(provincecode_1882) cluster(provincecode_1882)
	eststo `ruralbourgeoisie1'
	quietly sum ruralbourgeoisie if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `ruralbourgeoisie1'
	
	local indep_vars cottonpost1882
	local indep_hypotheses
	foreach var of local indep_vars{
	local indep_hypotheses = "`indep_hypotheses' {`var'}"
}

	boottest `indep_hypotheses', cluster(provincecode_1882) reps (999999) weight (webb) nograph
	matrix boot_pval  = J(1,1,.)
	matrix boot_pval[1,1] = r(p)


	foreach mat in "boot_pval" {
	matrix colnames `mat' = `indep_vars'
	estadd matrix `mat' = `mat': `ruralbourgeoisie1'
}

local ruralbourgeoisie2 = "ruralbourgeoisie2"

	quietly reghdfe ruralbourgeoisie cottonpost1882 `controls' i.cycle, absorb(provincecode_1882) cluster(provincecode_1882)
	eststo `ruralbourgeoisie2'
	quietly sum ruralbourgeoisie if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `ruralbourgeoisie2'
	
	local indep_vars cottonpost1882
	local indep_hypotheses
	foreach var of local indep_vars{
	local indep_hypotheses = "`indep_hypotheses' {`var'}"
}

	boottest `indep_hypotheses', cluster(provincecode_1882) reps (999999) weight (webb) nograph
	matrix boot_pval  = J(1,1,.)
	matrix boot_pval[1,1] = r(p)

	foreach mat in "boot_pval" {
	matrix colnames `mat' = `indep_vars'
	estadd matrix `mat' = `mat': `ruralbourgeoisie2'
}

local urbanbourgeoisie1 = "urbanbourgeoisie1"

	quietly reghdfe urbanbourgeoisie cottonpost1882 i.cycle, absorb(provincecode_1882) cluster(provincecode_1882)
	eststo `urbanbourgeoisie1'
	quietly sum urbanbourgeoisie if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `urbanbourgeoisie1'
	
	local indep_vars cottonpost1882
	local indep_hypotheses
	foreach var of local indep_vars{
	local indep_hypotheses = "`indep_hypotheses' {`var'}"
}

	boottest `indep_hypotheses', cluster(provincecode_1882) reps (999999) weight (webb) nograph
	matrix boot_pval  = J(1,1,.)
	matrix boot_pval[1,1] = r(p)


	foreach mat in "boot_pval" {
	matrix colnames `mat' = `indep_vars'
	estadd matrix `mat' = `mat': `urbanbourgeoisie1'
}

local urbanbourgeoisie2 = "urbanbourgeoisie2"

	quietly reghdfe urbanbourgeoisie cottonpost1882 `controls' i.cycle, absorb(provincecode_1882) cluster(provincecode_1882)
	eststo `urbanbourgeoisie2'
	quietly sum urbanbourgeoisie if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `urbanbourgeoisie2'
	
	local indep_vars cottonpost1882
	local indep_hypotheses
	foreach var of local indep_vars{
	local indep_hypotheses = "`indep_hypotheses' {`var'}"
}

	boottest `indep_hypotheses', cluster(provincecode_1882) reps (999999) weight (webb) nograph
	matrix boot_pval  = J(1,1,.)
	matrix boot_pval[1,1] = r(p)

	foreach mat in "boot_pval" {
	matrix colnames `mat' = `indep_vars'
	estadd matrix `mat' = `mat': `urbanbourgeoisie2'
}


esttab aristocracy1 aristocracy2 ruralbourgeoisie1 ruralbourgeoisie2 urbanbourgeoisie1 urbanbourgeoisie2 ///
using TableA4-7.tex, replace booktabs nogaps compress ///
cells(b(star pvalue(boot_pval) fmt(%9.3f)) boot_pval(par fmt(%9.3f))) collabels(none) ///
indicate("Controls = 1.post1882#c.cerealyieldperfed1877P") ///
keep(cottonpost1882) ///
coeflabel(cottonpost1882 "Post-1882 \$\times\$ Cotton") nomtitles ///
mgroups("\specialcell{=1 if Landed Elite}" "\specialcell{=1 if Rural\\Middle Class}" "\specialcell{=1 if Urban\\Middle Class}", pattern(1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span) star(* 0.10 ** 0.05 *** 0.01) nonotes ///
noconstant stats(cyclefe provincefe Clusters Obs R2 meany, fmt(0 0 0 0 2 2) label("Session FEs" "Province FEs" "Clusters (Provinces)" "Obs (MP-Session)" "\$R^2\$" "Av. Dep. Var. 1866-1882")) substitute(\_ _)



*APPENDIX TABLE A4.8. The British Occupation and Social Class Composition of Parliament: Excluding MPs Whose Geographic Assignment Changed

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if obsattributed1 | obsattributed2 //117
drop if Missing == 1 //136
drop if classmissing == 1 //14

local controls 1.post1882#c.cerealyieldperfed1877P


foreach y in aristocracy ruralbourgeoisie urbanbourgeoisie{
	
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882, absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'1
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'1
	
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'2
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'2
}


esttab aristocracy1 aristocracy2 ruralbourgeoisie1 ruralbourgeoisie2 urbanbourgeoisie1 urbanbourgeoisie2 ///
using TableA4-8.tex, replace booktabs nogaps compress ///
keep(1.post1882#c.cottonyieldperfed1877P 1.post1882#c.cerealyieldperfed1877P) ///
coeflabel(1.post1882#c.cottonyieldperfed1877P "Post-1882 \$\times\$ Cotton" ///
1.post1882#c.cerealyieldperfed1877P "Post-1882 \$\times\$ Cereals") nomtitles ///
mgroups("\specialcell{=1 if Landed Elite}" "\specialcell{=1 if Rural\\Middle Class}" "\specialcell{=1 if Urban\\Middle Class}", pattern(1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span) ///
label se b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) nonotes ///
noconstant stats(cyclefe provincefe Clusters Obs R2 meany, fmt(0 0 0 0 2 2) label("Session FEs" "Province FEs" "Clusters (Provinces)" "Obs (MP-Session)" "\$R^2\$" "Av. Dep. Var. 1866-1882")) substitute(\_ _)



*APPENDIX TABLE A4.9. The British Occupation and Social Class Composition of Parliament: Excluding MPs Whose Occupational Title Changed 

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if occupationshift_real //37
drop if Missing == 1 //135
drop if classmissing == 1 //16

local controls 1.post1882#c.cerealyieldperfed1877P


foreach y in aristocracy ruralbourgeoisie urbanbourgeoisie{
	
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882, absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'1
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'1
	
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'2
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'2
}


esttab aristocracy1 aristocracy2 ruralbourgeoisie1 ruralbourgeoisie2 urbanbourgeoisie1 urbanbourgeoisie2 ///
using TableA4-9.tex, replace booktabs nogaps compress ///
keep(1.post1882#c.cottonyieldperfed1877P 1.post1882#c.cerealyieldperfed1877P) ///
coeflabel(1.post1882#c.cottonyieldperfed1877P "Post-1882 \$\times\$ Cotton" ///
1.post1882#c.cerealyieldperfed1877P "Post-1882 \$\times\$ Cereals") nomtitles ///
mgroups("\specialcell{=1 if Landed Elite}" "\specialcell{=1 if Rural\\Middle Class}" "\specialcell{=1 if Urban\\Middle Class}", pattern(1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span) ///
label se b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) nonotes ///
noconstant stats(cyclefe provincefe Clusters Obs R2 meany, fmt(0 0 0 0 2 2) label("Session FEs" "Province FEs" "Clusters (Provinces)" "Obs (MP-Session)" "\$R^2\$" "Av. Dep. Var. 1866-1882")) substitute(\_ _)



*APPENDIX TABLE A4.10. The British Occupation and Social Class Composition of Parliament: Excluding MPs Whose Honorific Title Changed 

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if titleshift_real //148
drop if Missing == 1 //131
drop if classmissing == 1 //16

local controls 1.post1882#c.cerealyieldperfed1877P


foreach y in aristocracy ruralbourgeoisie urbanbourgeoisie{
	
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882, absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'1
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'1
	
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'2
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'2
}


esttab aristocracy1 aristocracy2 ruralbourgeoisie1 ruralbourgeoisie2 urbanbourgeoisie1 urbanbourgeoisie2 ///
using TableA4-10.tex, replace booktabs nogaps compress ///
keep(1.post1882#c.cottonyieldperfed1877P 1.post1882#c.cerealyieldperfed1877P) ///
coeflabel(1.post1882#c.cottonyieldperfed1877P "Post-1882 \$\times\$ Cotton" ///
1.post1882#c.cerealyieldperfed1877P "Post-1882 \$\times\$ Cereals") nomtitles ///
mgroups("\specialcell{=1 if Landed Elite}" "\specialcell{=1 if Rural\\Middle Class}" "\specialcell{=1 if Urban\\Middle Class}", pattern(1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span) ///
label se b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) nonotes ///
noconstant stats(cyclefe provincefe Clusters Obs R2 meany, fmt(0 0 0 0 2 2) label("Session FEs" "Province FEs" "Clusters (Provinces)" "Obs (MP-Session)" "\$R^2\$" "Av. Dep. Var. 1866-1882")) substitute(\_ _)



*APPENDIX TABLE A4.11. The British Occupation and Social Class Composition of Parliament: Initial Occupational Titles as Dependent Variables


use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if Missing == 1 //136
drop if urban == 1 //117
count if MP_Occupation_Code_Mod == . //172

gen any_bureaucrat_mod = top_bureaucrat_mod | bureaucrat_mod
replace any_bureaucrat_mod = . if MP_Occupation_Code_Mod == .

gen village_headman_ayan_mod = village_headman_mod | ayan_mod
replace village_headman_ayan_mod = . if MP_Occupation_Code_Mod == .

gen other_mod = professional_mod | businessman_mod | religious_elite_mod
replace other_mod = . if MP_Occupation_Code_Mod == .

local controls 1.post1882#c.cerealyieldperfed1877P

foreach y in any_bureaucrat_mod village_headman_ayan_mod other_mod missing_mod{
		
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'
}


esttab any_bureaucrat_mod village_headman_ayan_mod other_mod missing_mod ///
using TableA4-11.tex, replace booktabs nogaps compress ///
keep(1.post1882#c.cottonyieldperfed1877P 1.post1882#c.cerealyieldperfed1877P) ///
coeflabel(1.post1882#c.cottonyieldperfed1877P "Post-1882 \$\times\$ Cotton" ///
1.post1882#c.cerealyieldperfed1877P "Post-1882 \$\times\$ Cereals") ///
mtitles("\specialcell{Top Bureaucrat\\or Bureaucrat}" "\specialcell{Village Headman\\or Notable}" "\specialcell{Other Occupation}" "\specialcell{Missing Occupation}") ///
label se b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) nonotes ///
noconstant stats(cyclefe provincefe Clusters Obs R2 meany, fmt(0 0 0 0 2 2) label("Session FEs" "Province FEs" "Clusters (Provinces)" "Obs (MP-Session)" "\$R^2\$" "Av. Dep. Var. 1866-1882")) substitute(\_ _)



*APPENDIX TABLE A4.12. The British Occupation and Social Class Composition of Parliament: Initial Honorific Titles as Dependent Variables

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if Missing == 1 //136
count if Full_Title_mod == "" //42

gen mp_bekpasha_mod = mp_bek_mod | mp_pasha_mod
replace mp_bekpasha_mod = . if Full_Title_mod == ""

gen mp_sheikheffendi_mod = mp_sheikh_mod | mp_effendi_mod
replace mp_sheikheffendi_mod = . if Full_Title_mod == ""

local controls 1.post1882#c.cerealyieldperfed1877P

foreach y in mp_bekpasha_mod mp_sheikheffendi_mod mp_othertitle_mod mp_missingtitle_mod{
		
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'
}


esttab mp_bekpasha_mod mp_sheikheffendi_mod mp_othertitle_mod mp_missingtitle_mod ///
using TableA4-12.tex, replace booktabs nogaps compress ///
keep(1.post1882#c.cottonyieldperfed1877P 1.post1882#c.cerealyieldperfed1877P) ///
coeflabel(1.post1882#c.cottonyieldperfed1877P "Post-1882 \$\times\$ Cotton" ///
1.post1882#c.cerealyieldperfed1877P "Post-1882 \$\times\$ Cereals") ///
mtitles("\specialcell{Bey or Pasha}" "\specialcell{Sheikh or Effendi}" "\specialcell{Other}" "\specialcell{Missing Title}") ///
label se b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) nonotes ///
noconstant stats(cyclefe provincefe Clusters Obs R2 meany, fmt(0 0 0 0 2 2) label("Session FEs" "Province FEs" "Clusters (Provinces)" "Obs (MP-Session)" "\$R^2\$" "Av. Dep. Var. 1866-1882")) substitute(\_ _)




*APPENDIX TABLE A4.13. The British Occupation and Social Class Composition of Parliament: Session- Varying Social Class

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if Missing == 1 //136
drop if classmissing == 1 //16

local controls 1.post1882#c.cerealyieldperfed1877P

foreach y in aristocracy1 ruralbourgeoisie1 urbanbourgeoisie1{
	
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882, absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'1
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'1
	
	quietly reghdfe `y' c.cottonyieldperfed1877P#1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'2
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'2
}


esttab aristocracy11 aristocracy12 ruralbourgeoisie11 ruralbourgeoisie12 urbanbourgeoisie11 urbanbourgeoisie12 ///
using TableA4-13.tex, replace booktabs nogaps compress ///
keep(1.post1882#c.cottonyieldperfed1877P 1.post1882#c.cerealyieldperfed1877P) ///
coeflabel(1.post1882#c.cottonyieldperfed1877P "Post-1882 \$\times\$ Cotton" ///
1.post1882#c.cottonyieldperfed1877P "Post-1882 \$\times\$ Cereals") nomtitles ///
mgroups("\specialcell{=1 if Landed Elite}" "\specialcell{=1 if Rural\\Middle Class}" "\specialcell{=1 if Urban\\Middle Class}", pattern(1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span) ///
label se b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) nonotes ///
noconstant stats(cyclefe provincefe Clusters Obs R2 meany, fmt(0 0 0 0 2 2) label("Session FEs" "Province FEs" "Clusters (Provinces)" "Obs (MP-Session)" "\$R^2\$" "Av. Dep. Var. 1866-1882")) substitute(\_ _)




***************************************************************
***************************************************************
***************A5: ADDITIONAL TABLES AND FIGURES***************
***************************************************************
***************************************************************


*APPENDIX TABLE A5.14. Summary Statistics in 1866–1882 by Cotton Productivity in 1877

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if Missing == 1 //136
drop if classmissing == 1 //16
keep if cycle >= 2 & cycle <= 5 //610 

*Define above and below the median of cotton productivity based on the cross-province distribution (unweighted)
gen cottonyieldperfed1877P_HM = cottonyieldperfed1877P > 1.067931
replace cottonyieldperfed1877P_HM = . if cottonyieldperfed1877P == .

*Define rural provinces
gen rural = (1 - urban) & Missing!=1

global MAINVARS aristocracy ruralbourgeoisie urbanbourgeoisie mp_pasha_mod mp_bek_mod mp_effendi_mod mp_sheikh_mod mp_othertitle_mod mp_missingtitle_mod top_bureaucrat_mod professional_mod businessman_mod religious_elite_mod bureaucrat_mod village_headman_mod ayan_mod missing_mod rural urban cottonyieldperfed1877P cerealyieldperfed1877P

label variable aristocracy "=1 if MP Landed Elite" 
label variable ruralbourgeoisie "=1 if MP Rural Middle Class" 
label variable urbanbourgeoisie "=1 if MP Urban Middle Class" 
label variable mp_pasha_mod "=1 if MP Pasha" 
label variable mp_bek_mod "=1 if MP Bey" 
label variable mp_effendi_mod "=1 if MP Effendi" 
label variable mp_sheikh_mod "=1 if MP Sheikh" 
label variable mp_othertitle_mod "=1 if MP Holds Other Honorific Title" 
label variable mp_missingtitle_mod "=1 if MP Missing Honorific Title" 
label variable top_bureaucrat_mod "=1 if MP Top Bureaucrat" 
label variable professional_mod "=1 if MP Professional" 
label variable businessman_mod "=1 if MP Business" 
label variable religious_elite_mod "=1 if MP Religious Elite" 
label variable bureaucrat_mod "=1 if MP Bureaucrat" 
label variable village_headman_mod "=1 if MP Village Headman" 
label variable ayan_mod "=1 if MP Notable" 
label variable missing_mod "=1 if MP Missing Occupation" 
label variable rural "=1 if MP Rural Constituency" 
label variable urban "=1 if MP Urban Constituency" 
label variable cottonyieldperfed1877P "Cotton Yield Per Feddan in 1877" 
label variable cerealyieldperfed1877P "Cereals Yield Per Feddan in 1877" 
                                
mata: mata clear

*First: Test of differences
local i = 1

foreach var in $MAINVARS {
    quietly reg `var' cottonyieldperfed1877P_HM, vce(cluster provincecode_1882)
    outreg, keep(cottonyieldperfed1877P_HM) rtitle("`: var label `var''") stats(b) ///
        noautosumm store(row`i') starlevels(10 5 1) starloc(1)
    outreg, replay(diff) append(row`i') ctitles("",Difference ) ///
        store(diff) note("")
    local ++i
}
outreg, replay(diff)


*Second: Summary statistics

local count: word count $MAINVARS
mat sumstat = J(`count',6,.)

local i = 1
foreach var in $MAINVARS {
    quietly: summarize `var' if cottonyieldperfed1877P_HM==0
    mat sumstat[`i',1] = r(N)
    mat sumstat[`i',2] = r(mean)
    mat sumstat[`i',3] = r(sd)
    quietly: summarize `var' if cottonyieldperfed1877P_HM==1
    mat sumstat[`i',4] = r(N)
    mat sumstat[`i',5] = r(mean)
    mat sumstat[`i',6] = r(sd)
    local i = `i' + 1
}
frmttable, statmat(sumstat) store(sumstat) sfmt(g,f,f,g,f,f)


outreg using "TableA5-14.tex", ///
    replay(sumstat) merge(diff) tex nocenter note("") fragment plain replace ///
    ctitles("", Low Cotton, "", "", High Cotton, "", "", "" \ "", N, Mean, SD, N, Mean, SD, Diff) ///
    multicol(1,2,3;1,5,3)
	


*APPENDIX TABLE A5.15. Mechanism: Precolonial Political and Economic Congruence of Precolonial Elites — Urban Middle Class
	

use "WD1_Egypt_MPs_1824_1923.dta", clear

drop if Missing == 1 //136
drop if classmissing == 1 //16

local controls 1.post1882#c.cerealyieldperfed1877P

foreach y in urbanbourgeoisie{
	
	quietly reghdfe `y' c.cottonyieldperfed1877P##c.propspeaking_count_GT8##1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'1
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'1

	quietly reghdfe `y' c.cottonyieldperfed1877P##c.villagechief##1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'2
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'2
	
	quietly reghdfe `y' c.cottonyieldperfed1877P##ib2.largeestatepropP_Q##1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'3
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'3
	
	quietly reghdfe `y' c.cottonyieldperfed1877P##c.slavepdistP1882##1.post1882 `controls', absorb(cycle provincecode_1882) cluster(provincecode_1882)
	eststo `y'4
	quietly sum `y' if cycle >= 2 & cycle <= 5
	local meany = r(mean)
	quietly estadd scalar Clusters = e(N_clust)
	quietly estadd scalar Obs = e(N)
	quietly estadd scalar R2 = e(r2)
	quietly estadd scalar meany = `meany'
	quietly estadd local cyclefe "Yes"
	quietly estadd local provincefe "Yes"
	estimates store `y'4
}


esttab urbanbourgeoisie1 urbanbourgeoisie2 urbanbourgeoisie3 urbanbourgeoisie4 ///
using TableA5-15.tex, replace booktabs nogaps compress ///
keep(1.post1882#c.cottonyieldperfed1877P 1.post1882#c.cottonyieldperfed1877P#c.propspeaking_count_GT8 ///
1.post1882#c.cottonyieldperfed1877P#c.villagechief 3.largeestatepropP_Q#1.post1882#c.cottonyieldperfed1877P ///
4.largeestatepropP_Q#1.post1882#c.cottonyieldperfed1877P 1.post1882#c.cottonyieldperfed1877P#c.slavepdistP1882 /// 
1.post1882#c.propspeaking_count_GT8 1.post1882#c.villagechief 1.largeestatepropP_Q#1.post1882 3.largeestatepropP_Q#1.post1882 4.largeestatepropP_Q#1.post1882 ///
1.post1882#c.slavepdistP1882 1.post1882#c.cerealyieldperfed1877P) ///
order(1.post1882#c.cottonyieldperfed1877P#c.propspeaking_count_GT8 ///
1.post1882#c.cottonyieldperfed1877P#c.villagechief 3.largeestatepropP_Q#1.post1882#c.cottonyieldperfed1877P ///
4.largeestatepropP_Q#1.post1882#c.cottonyieldperfed1877P 1.post1882#c.cottonyieldperfed1877P#c.slavepdistP1882 /// 
1.post1882#c.cottonyieldperfed1877P ///
1.post1882#c.propspeaking_count_GT8 1.post1882#c.villagechief 1.largeestatepropP_Q#1.post1882 3.largeestatepropP_Q#1.post1882 4.largeestatepropP_Q#1.post1882 1.post1882#c.slavepdistP1882 ///
1.post1882#c.cerealyieldperfed1877P) ///
coeflabel(1.post1882#c.cottonyieldperfed1877P#c.propspeaking_count_GT8 "Post-1882 \$\times\$ Cotton \$\times\$ Democratic Speeches Per MP" ///
1.post1882#c.cottonyieldperfed1877P#c.villagechief "Post-1882 \$\times\$ Cotton \$\times\$ N. Urabi V. Headmen Arrests" ///
3.largeestatepropP_Q#1.post1882#c.cottonyieldperfed1877P "Post-1882 \$\times\$ Cotton \$\times\$ Large Estates Land Share (Q3)" ///
4.largeestatepropP_Q#1.post1882#c.cottonyieldperfed1877P "Post-1882 \$\times\$ Cotton \$\times\$ Large Estates Land Share (Q4)" ///
1.post1882#c.cottonyieldperfed1877P#c.slavepdistP1882 "Post-1882 \$\times\$ Cotton \$\times\$ Prop. Slaves" /// 
1.post1882#c.propspeaking_count_GT8 "Post-1882 \$\times\$ Prop. Democratic Speeches" ///
1.post1882#c.villagechief "Post-1882 \$\times\$ N. Urabi V. Headmen Arrests" ////
1.largeestatepropP_Q#1.post1882 "Post-1882 \$\times\$ Large Estates Land Share (Q1)" ///
3.largeestatepropP_Q#1.post1882 "Post-1882 \$\times\$ Large Estates Land Share (Q3)" ///
4.largeestatepropP_Q#1.post1882 "Post-1882 \$\times\$ Large Estates Land Share (Q4)" ///
1.post1882#c.slavepdistP1882 "Post-1882 \$\times\$ Prop. Slaves" ///
1.post1882#c.cottonyieldperfed1877P "Post-1882 \$\times\$ Cotton" ///
1.post1882#c.cerealyieldperfed1877P "Post-1882 \$\times\$ Cereals") nomtitles ///
mgroups("\specialcell{=1 if Urban\\Middle Class}", pattern(1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span) ///
label se b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) nonotes ///
noconstant stats(cyclefe provincefe Clusters Obs R2 meany, fmt(0 0 0 0 2 2) label("Session FEs" "Province FEs" "Clusters (Provinces)" "Obs (MP-Session)" "\$R^2\$" "Av. Dep. Var. 1866-1882")) substitute(\_ _)



	
	
*APPENDIX FIGURE A5.7. Members of Parliament by Incumbency Status, 1824–1923

use "WD1_Egypt_MPs_1824_1923.dta", clear

gen dynastymissing = MPD_ID == .

graph bar (sum) firsttimer incumbent, over(cycle, label (angle(45))) stack legend(order(1 "New Entrant MP" 2 "Incumbent MP")) title("") graphregion(color(white))
graph export FigureA5-7a.eps, replace

graph bar (sum) firsttimer_D incumbent_D dynastymissing, over(cycle, label (angle(45))) stack legend(order(1 "New Entrant Dynasty" 2 "Incumbent Dynasty" 3 "Dynasty Missing")) title("") graphregion(color(white))
graph export FigureA5-7b.eps, replace


*APPENDIX FIGURE A5.8. Members of Parliament by Election and Appointment Status, 1824–1923

use "WD1_Egypt_MPs_1824_1923.dta", clear

graph bar (sum) Appointed Elected, over(cycle, label (angle(45))) stack legend(order(1 "Appointed" 2 "Elected")) title("") graphregion(color(white))
graph export FigureA5-8.eps, replace


*APPENDIX FIGURE A5.9. Members of Parliament by Upper and Lower House Membership, 1824–1923

use "WD1_Egypt_MPs_1824_1923.dta", clear

graph bar (sum) house0 house1 house2, over(cycle, label (angle(45))) stack legend(order(1 "Unicameral" 2 "Upper House" 3 "Lower House")) title("") graphregion(color(white))
graph export FigureA5-9.eps, replace

